import java.util.Scanner;

public class Main1 {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        int n = num.nextInt();
        int k = num.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = num.nextInt();
        }

        for (int i = 0; i < n; i++) {
            int temp = arr[i];
            for (int j = i + 1; j < n ; j++) {
                if (temp + arr[j] == k) {
                    System.out.println(temp + " " + arr[j]);
                }
            }
        }
    }
}
